<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>测试json$</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
    $(function () {
      $("#btnId").click(function () {
        $.ajax({
          url:"${pageContext.request.contextPath}/",
          type:"POST",
          data:"",
          dataType:"text",
          success:function (obj) {
            alert(obj);
          }

        });
      });
    });
    </script>
  </head>
  <body>
  <input type="button" value="点击" id="btnId">
  </body>
</html>
